/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package carstore.orderserver.models;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.text.DateFormat;

/**
 *
 * @author wuhao
 */
public class OrderInfoExt implements Serializable {

    private static final long serialVersionUID = 1L;
    private BigInteger orderId;
        private Date orderTime;
        private String status;
        private Integer storeId;
        private Integer userId;
        private Integer carID;

    private String storeName;
    private String carName;
    private String userName;
    private String factoryId;
    private String strOrderId;
    private String strOrderTime;
    private SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    
    public OrderInfoExt() {
    }

    public OrderInfoExt(BigInteger orderId) {
        this.orderId = orderId;
        this.strOrderId=orderId.toString();
    }

    public String getStrOrderTime(){return strOrderTime;}
    public String getStrOrderId(){return strOrderId;}
    public void setStrOrderId(String StrOrderId){this.strOrderId=StrOrderId;}

    public String getStoreName(){return storeName;}
    public void setStoreName(String StoreName){this.storeName=StoreName;}
    public String getCarName(){return carName;}
    public void setCarName(String CarName){this.carName=CarName;}
    public String getUserName(){return userName;}
    public void setUserName(String UserName){this.userName=UserName;}
    public String getFactoryId(){return factoryId;}
    public void setFactoryId(String FactoryId){this.factoryId=FactoryId;}

    public BigInteger getOrderId() {
        return orderId;
    }

    public void setOrderId(BigInteger orderId) {
        this.orderId = orderId;
        this.strOrderId=orderId.toString();
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
        this.strOrderTime=formatter.format(orderTime);
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getStoreId() {
        return storeId;
    }

    public void setStoreId(Integer storeId) {
        this.storeId = storeId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getCarID() {
        return carID;
    }

    public void setCarID(Integer carID) {
        this.carID = carID;
    }

}
